Public Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
Function JMTestDirectory(argDirectory As String) As Integer
Dim wrkDirectory As String
Dim wrkString As String
JMTestDirectory = False
On Error GoTo JMTestDirectoryError
wrkDirectory = Trim$(argDirectory)
Select Case Len(wrkDirectory)
Case 0, 1
Case 2
If (Mid$(wrkDirectory, 2, 1) = ":") Then JMTestDirectory = True
Case 3
If (Mid$(wrkDirectory, 2, 1) = ":" And Mid$(wrkDirectory, 3, 1) = "\") Then
JMTestDirectory = True
End If
Case Else
wrkString = Dir$(wrkDirectory, 16)
If (wrkString <> "") Then JMTestDirectory = True
End Select
Exit Function
JMTestDirectoryError:
Err.Clear
Exit Function
End Function
Function JMAddMissingBackslash(argInput As String) As String
On Error Resume Next
JMAddMissingBackslash = argInput
If (argInput = "") Then Exit Function
If (Right$(argInput, 1) <> "\") Then
JMAddMissingBackslash = argInput & "\"
End If
End Function
Public Function JMShortFileName(argFile As String) As String